home *** CD-ROM | disk | FTP | other *** search
- on ExportSavedGame nr
- global gRsrcPath
- set F to FileIO(mnew, "READ", FixPath(gRsrcPath & "BP2SAVED\INDEX.IIF"))
- if objectp(F) then
- set IndexText to F(mReadFile)
- F(mdispose)
- set SGL to value(line 2 of IndexText)
- set fileName to getAt(SGL, nr) & ".BPD"
- set F to FileIO(mnew, "READ", FixPath(gRsrcPath & "BP2SAVED\" & fileName))
- if objectp(F) then
- set savedgametxt to F(mReadFile)
- F(mdispose)
- set expotxt to savedgametxt
- set F to FileIO(mnew, "?WRITE", "BP2GAME.TXT")
- if objectp(F) then
- set err to F(mWriteString, expotxt)
- F(mdispose)
- if err then
- alert(line 1 of field "MenuErrorMessages")
- end if
- end if
- end if
- end if
- end
-